package com.sweets.look.ui.activity;

import android.content.Intent;
import android.graphics.Paint;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.sweet.satellite.TranslucentSBActivity;
import com.sweets.look.R;
import com.sweets.look.util.Utils;

/**
 * Author   Shone
 * Date     23/08/16.
 * Github   https://github.com/shonegg
 */
public class AboutActivity extends TranslucentSBActivity implements View.OnClickListener {

    private TextView versionTv;
    private TextView privacyTv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);
        versionTv = (TextView) findViewById(R.id.textVersion);
        versionTv.setText(getString(R.string.about_version) + Utils.getAppVersionName(this));
        privacyTv = (TextView) findViewById(R.id.textPrivacy);
        privacyTv.setOnClickListener(this);
        setToolbarTitle(R.string.about);
        privacyTv.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.textPrivacy: {
                startActivity(new Intent(AboutActivity.this, PrivacyActivity.class));
                break;
            }
        }
    }
}
